var superagent = require('superagent');

export default class HttpHelper {
    static get(url, val) {
        return new Promise((resolve, reject) => {
            superagent.get(url).query(val).end((err, res) => {
                // debugger
                if (!!err) {
                    reject(err);
                } else {
                    resolve(res);
                }
            });
        });
    }
}   